﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Space.Model
{
    static class ShipFactory
    {
        public static ShipModel CreateDestroyerLaserShip(string name, Race owner, OwnerType ownerType)
        {
            var laserShip = new ShipModel(name, 50, 100, 100, owner, ownerType, ShipType.Destroyer); 


            laserShip.AddWeapon(CreateLaser());
            laserShip.AddWeapon(CreateLaser());

            laserShip.Name = name;

            return laserShip;
        }

        public static ShipModel CreateCruiserMdShip(string name, Race owner, OwnerType ownerType)
        {
            var laserShip = new ShipModel(name, 50, 100, 100, owner, ownerType, ShipType.Cruiser);

            laserShip.AddWeapon(CreateMassDriver());
            laserShip.AddWeapon(CreateMassDriver());
            
            laserShip.Name = name;

            return laserShip;
        }

        public static ShipWeapon CreateLaser()
        {
            return new ShipWeapon {MaxDamage = 10, MinDamage = 1, Name = "Laser", Range = 5};
        }

        public static ShipWeapon CreateMassDriver()
        {
            return new ShipWeapon { MaxDamage = 8, MinDamage = 4, Name = "Mass Driver", Range = 7 };
        }
    }
}
